"""empty message

Revision ID: f2f9a97b59c6
Revises: c48e9d6db6ab
Create Date: 2024-05-17 14:03:25.915291

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'f2f9a97b59c6'
down_revision: Union[str, None] = 'c48e9d6db6ab'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('resume',
    sa.Column('id', sa.Uuid(), nullable=False),
    sa.Column('user_id', sa.Uuid(), nullable=False),
    sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('resume_about_us',
    sa.Column('about_us', sa.String(), nullable=False, comment='О себе'),
    sa.Column('id', sa.Uuid(), nullable=False),
    sa.Column('cv_user_id', sa.Uuid(), nullable=False),
    sa.ForeignKeyConstraint(['cv_user_id'], ['resume.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('resume_contact',
    sa.Column('email', sa.String(), nullable=False, comment='E-mail'),
    sa.Column('phone', sa.String(), nullable=False, comment='Телефон'),
    sa.Column('telegram', sa.String(), nullable=False, comment='Telegram'),
    sa.Column('id', sa.Uuid(), nullable=False),
    sa.Column('cv_user_id', sa.Uuid(), nullable=False),
    sa.ForeignKeyConstraint(['cv_user_id'], ['resume.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('resume_education',
    sa.Column('year', sa.Integer(), nullable=False, comment='Год'),
    sa.Column('education_institution', sa.String(), nullable=False, comment='Учебное заведение'),
    sa.Column('faculty', sa.String(), nullable=False, comment='Факультет'),
    sa.Column('specialization', sa.String(), nullable=False, comment='Специализация'),
    sa.Column('graduation_year', sa.Integer(), nullable=False, comment='Год окончания'),
    sa.Column('id', sa.Uuid(), nullable=False),
    sa.Column('cv_user_id', sa.Uuid(), nullable=False),
    sa.ForeignKeyConstraint(['cv_user_id'], ['resume.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('resume_info',
    sa.Column('name', sa.String(), nullable=False, comment='Имя'),
    sa.Column('patronymic', sa.String(), nullable=False, comment='Отчество'),
    sa.Column('surname', sa.String(), nullable=False, comment='Фамилия'),
    sa.Column('residence', sa.String(), nullable=True, comment='Место проживания'),
    sa.Column('id', sa.Uuid(), nullable=False),
    sa.Column('cv_user_id', sa.Uuid(), nullable=False),
    sa.ForeignKeyConstraint(['cv_user_id'], ['resume.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('resume_position',
    sa.Column('position', sa.String(), nullable=False, comment='Желаемая должность'),
    sa.Column('employment', sa.String(), nullable=False, comment='Занятость'),
    sa.Column('work_schedule', sa.String(), nullable=False, comment='График работы'),
    sa.Column('id', sa.Uuid(), nullable=False),
    sa.Column('cv_user_id', sa.Uuid(), nullable=False),
    sa.ForeignKeyConstraint(['cv_user_id'], ['resume.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('resume_salary',
    sa.Column('salary', sa.String(), nullable=False, comment='Зарплата'),
    sa.Column('id', sa.Uuid(), nullable=False),
    sa.Column('cv_user_id', sa.Uuid(), nullable=False),
    sa.ForeignKeyConstraint(['cv_user_id'], ['resume.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('resume_skill',
    sa.Column('skill', sa.String(), nullable=False, comment='Ключевые навыки'),
    sa.Column('id', sa.Uuid(), nullable=False),
    sa.Column('cv_user_id', sa.Uuid(), nullable=False),
    sa.ForeignKeyConstraint(['cv_user_id'], ['resume.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_table('resume_work',
    sa.Column('start_work', sa.Integer(), nullable=False, comment='Начало работы'),
    sa.Column('end_work', sa.Integer(), nullable=False, comment='Окончание работы'),
    sa.Column('position', sa.String(), nullable=False, comment='Позиция'),
    sa.Column('company', sa.String(), nullable=False, comment='Компания'),
    sa.Column('workplace', sa.String(), nullable=False, comment='Обязанности на рабочем месте'),
    sa.Column('id', sa.Uuid(), nullable=False),
    sa.Column('cv_user_id', sa.Uuid(), nullable=False),
    sa.ForeignKeyConstraint(['cv_user_id'], ['resume.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('resume_work')
    op.drop_table('resume_skill')
    op.drop_table('resume_salary')
    op.drop_table('resume_position')
    op.drop_table('resume_info')
    op.drop_table('resume_education')
    op.drop_table('resume_contact')
    op.drop_table('resume_about_us')
    op.drop_table('resume')
    # ### end Alembic commands ###
